<?php

namespace Wechat\Event;

class WsMessageEvent
{
    /**
     * @var string 消息事件名
     */
    public $event_name;
    
    /**
     * @var array 消息数据
     */
    public $message;

    /**
     * @var int 用户ID
     */
    public $user_id;

    /**
     * TalkMessageEvent constructor.
     *
     * @param string $event_name
     * @param array $data
     */
    public function __construct(string $event_name, int $user_id, array $message = [])
    {
        $this->user_id = $user_id;
        $this->event_name = $event_name;
        $this->message = $message;
    }

}